package com.data.web.constant;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;
import java.util.List;

@Slf4j
@NoArgsConstructor
@Data
public class PageResult<T> implements Serializable {

    private int totalCount;
    private List<T> list;


    public PageResult(int totalCount, List<T> list) {
        this.totalCount = totalCount;
        this.list = list;
    }

    public static <T> PageResult success(int totalCount, List<T> list){
        return new PageResult(totalCount,list);
    }
}
